package edu.spsu.courses;

import edu.spsu.R;
import edu.spsu.R.layout;
import edu.spsu.utils.Util;
import android.app.Activity;
import android.os.Bundle;

public class CourseRegisterActivity extends Activity {
	private static String TAG = CourseRegisterActivity.class.getName();
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

    	reportLifeCycle("onCreate");
    }
    
    @Override
    protected void onStart() {

    	reportLifeCycle("onStart");
    	super.onStart();
    }

    @Override
    protected void onRestart() {

    	reportLifeCycle("onRestart");
    	super.onRestart();
    }
    
    @Override
    protected void onResume() {

    	reportLifeCycle("onResume");
    	super.onResume();
    }

    @Override
    protected void onPause() {
    	super.onPause();
    	reportLifeCycle("onPause");
    }
    
    @Override
    protected void onStop() {
    	super.onStop();
    	reportLifeCycle("onStop");
    }
   
    /** Called when the activity is finished. */
    @Override
    public void onDestroy() {
        super.onDestroy();

    	reportLifeCycle("onDestroy");
    }

    private void report(Object o) {

        Util.report(this, TAG, o, false);
	}
    
    private void reportLifeCycle(Object o) {

        Util.report(this, TAG, o+" completed successfully", false);
	}
    
    private void reportException(Object o) {

        Util.report(this, TAG, "Exception Thrown: "+o, true);

	}
}